<?php
namespace app\admin\model;

use frame\lib\Db;

class User{
    public static function list($query = '')
    {
        if($query){
            $list = Db::name('user')->where(['role' => 1])->like('username',"%$query%")->select();
        }else{
            $list = Db::name('user')->where(['role' => 1])->select();
        }
        return $list;
    }
  
}